package com.fesine.quartz.chapter14;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @description: 类描述
 * @author: Fesine
 * @createTime:2016/11/20 19:44
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2016/11/20 19:44
 */
public class SecondJob implements Job {
    Log logger = LogFactory.getLog(SecondJob.class);

    public void execute(JobExecutionContext context) throws JobExecutionException {
        logger.info("我被第一个job调起执行");
        JobResult result = (JobResult) context.getMergedJobDataMap().get("JOB_RESULT");
        if (result == null) {
            result = (JobResult) context.getJobDetail().getJobDataMap().get("JOB_RESULT");
        }
        if (result != null) {
            logger.info("---->"+result);
        }
    }
}
